<template>
	<!-- 详情 -->
	<view class="basicInformation">
		<view class="content">
			<view class="title">
				基本信息
			</view>
			<view class="content-row">
				<view class="content-row-div">姓名</view>
				<text>{{basicInformation.counsellingName}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">性别</view>
				<text>{{basicInformation.counsellingSex===0?'男':'女'}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">出生日期</view>
				<text>{{basicInformation.counsellingBirth}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">地址</view>
				<view>
					<view class="address">
						{{basicInformation.counsellingAddress}}
					</view>
					<view>
						{{basicInformation.counsellingBasic}}
					</view>
				</view>

			</view>
		</view>
		<view class="content">
			<view class="title">
				学习信息
			</view>
			<view class="content-row">
				<view class="content-row-div">科目</view>
				<text v-if="basicInformation.subjectsDtos"
					v-for="zi in basicInformation.subjectsDtos">{{zi.name}}{{zi.subjectsDtos}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">联系电话</view>
				<text>{{basicInformation.counsellingTelephone}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">基本情况</view>
				<text>{{basicInformation.counsellingBasic}}</text>
			</view>
			<view class="content-row">
				<view class="content-row-div">备注</view>
				<view>
					{{basicInformation.counsellingNotes?basicInformation.counsellingNotes : '暂无录入'}}
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	import {
		coachingTargets
	} from '../../api/my/index.js'
	export default {
		data() {
			return {
				id: '321',
				// 基本信息
				// 学习信息
				basicInformation: {

				},


			};
		},
		onLoad(info) {
			// console.log(e.id);
			if (info.targetsName == undefined) {
				this.infoList = JSON.parse(info.obj)
				console.log(this.infoList, '222122')
			} else {
				coachingTargets({
					userId: uni.getStorageSync('openId'),
					targetsName: info.targetsName
				}).then(res => {
					this.basicInformation = res.rows[0]
				})

			}

		},

	}
</script>

<style scoped>
	.basicInformation {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;

	}

	.content {
		margin-top: 20rpx;
		width: 95%;
		border-radius: 20rpx;
		background-color: #fff;
		padding: 40rpx;

	}

	.title {
		color: #999;
		margin-bottom: 70rpx;
	}

	.content-row {

		height: 100rpx;
		display: flex;

	}

	.content-row-div {
		width: 200rpx;
		height: 100rpx;
		display: inline-block;
	}

	.address {
		margin-bottom: 30rpx;

	}
</style>